<template>
  <view-box style="background:#F3F6F7;">
    <div class="address-search">
      <router-link to="/companysearch" class="search-div">
        <i class="search-icon iconfont icon-sousuo" style="font-size: 20px;"></i>
        <p class="search-String">天南山</p>
      </router-link>
    </div>
    <div style="height:55px;"></div>
     <div class="co-laou" style="box-shadow: 1px 1px 6px 0.2px rgba(0,0,0,0);" v-for="(item, index) in items" :key="index" @click="$router.push('/Companydetails?id=' + item.uid)">
        <div class="co-bott-om" style="border-bottom: 1px solid rgba(0,0,0,0.1);">
           <div class="work-job-lj">
                <p style="color: #ff0000;width:100%;">
                  <img style="width:66px;height:66px;border-radius: 7px;" :src="$apiUrl + '/storage/' + item.logo" alt="">
                </p>
            </div>
            <div class="work-job-cl" >
                <p class="job-pol-col" style="font-size:13px;color:#000;">{{item.cname}}</p>
                <p class="job-pol-col" style="font-size:13px;color:#BABABA;font-weight: 0;">{{item.renshu}} | {{item.hangye}}</p>
            </div>
        </div>
        <div class="co-pljh">
          <p style="color:#32B6C6;font-size:13px;">web工程师等2个职位正在招聘</p>
        </div>
     </div>
      <infinite-loading @infinite="infiniteHandler" ref="infiniteLoading">
        <load-more slot="no-more" :show-loading="false" tip="到底了" background-color="#fbf9fe"></load-more>
        <empty slot="no-results" tips="暂时没有相关内容"></empty>
      </infinite-loading>
  </view-box>
</template>
<script>
import bMenu from '../components/bottom_menu'
import { ViewBox, Box, Flexbox, FlexboxItem, XSwitch } from 'vux'
export default {
  components: {
    ViewBox,
    Box,
    Flexbox,
    FlexboxItem,
    XSwitch,
    bMenu
  },
  data () {
    return {
      show1: false,
      items: []
    }
  },
  methods: {
    // _gettalentsRecommend () {
    //   this.$http.get('/talentsRecommend').then(response => {
    //     this.items = response.data
    //     console.log(this.items)
    //   }).catch(error => {
    //     console.log(error)
    //   })
    // },
    infiniteHandler ($state) {
      this.$http.get('/gongsi', {
        params: {
          cname: this.$route.query.keywords,
          page: this.items.length / 5 + 1,
          page_size: 5
        }
      }).then((response) => {
        if (response.data.data.length) {
          this.items = this.items.concat(response.data.data)
          console.log(this.items)
          $state.loaded()
          if (!response.data.next_page_url) {
            $state.complete()
          }
        } else {
          $state.complete()
        }
      })
    }
  }
}
</script>
<style scoped>
 .address-search {
    height: 50px;
    width: 100%;
    font-size: 16px;
    position: fixed;
    z-index: 999;
    top: 0;
    display: flex;
    background-color: #fff;
  }
  .address-div {
    width: 25%;
    padding-left: 5px;
    height: 50px;
    line-height: 50px;
    display: flex;
    -webkit-box-pack: center;
    justify-content: center;
  }
  .address-icon {
    color: #595959;
    margin-left: 6px;
    padding-right: 6px;
  }
  .address-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #878787;
  }
  .xaddress {
    display: none;
  }
  .search-div {
    width: 94%;
    line-height: 30px;
    display: flex;
    height: 30px;
    margin-top: 10px;
    margin-left: 3%;
    background-color: #f2f2f2;
    border-radius: 20px;
  }
  .search-icon {
    color: #8e8e8e;
    margin-left: 5%;
    font-size: 20px;
  }
  .search-String {
    color: #bebebe;
    margin-left: 5%;
    font-size: 15px;
  }
  .main{
    width: 94.4%;
    margin: 0 auto;
  }
.background-clo{
  height: 104px;
  width: 100%;
}
.talent-clo{
    width: 100%;
    border-bottom: #e5e5e5 1px solid;
    height: 82.8px;
    line-height: 100.4px;
    display: flex;
    display:-webkit-flex;
  }
  .talent-clo span{
    font-size: 15px;
    width: 50%;
  }
  .recommended{
    text-align: left;
    height: 83.52px;
    margin-left: 21.6px;
    font-size: 21.6px !important;
    font-weight: 600;
  }
  .batch-in-a{
    text-align: right;
    height: 83.52px;
    margin-right: 21.6px;
    font-size: 12px !important;
    color: #999999;
  }
  .head-por{
    width: 94%;
    height: 322.56px;
    border-radius: 7.2px;
    position: relative;
    box-shadow: 1px 1px 1px 1px #dedede;
    margin-top: 14.4px;
  }
  .head-popule{
    width: 94%;
    height: auto;
    position: relative;
    margin-top: 14.4px;
  }
  .head-popule .nameDesig{
    width: 100%;
    height: 86.4px;
    position:initial;
    border-bottom-left-radius: 7.2px;
    border-bottom-right-radius: 7.2px;
    text-align: center;
  }
  .head-popule .nameDesig p{
    color: #000;
  }
  .head-por img{
    width: 100%;
    height:260px;
    border-top-left-radius: 7.2px;
    border-top-right-radius: 7.2px;
  }
  .head-popule img{
    width: 100%;
    height:100%;
    border-radius: 100%;
  }
  .nameDesig{
    width: 100%;
    height: 86.4px;
    position:absolute;
    bottom:0;
    border-bottom-left-radius: 7.2px;
    border-bottom-right-radius: 7.2px;
    text-align: center;
  }
  .icon-ion-cl{
    width: 100%;
    text-align: right;
    line-height: 51.84px;
    position: absolute;
    top: 0px;
    right: 0px;
  }
  .icon-ion-cl i{
    font-size: 39.6px;
    color: #4ebbd8;
    background: #fff;
    border-radius: 50%;
    position: relative;

  }
  .nameDesig p{
    font-size:18px;
    color: #fff;
    font-weight: 500;
  }
  .rwmai-cl{
    display: flex;
    width: 100%;
    border-bottom: 1px solid #e5e5e5;
  }
  .head-col-img{
    width: 20%;
  }
  .head-col-img img{
    width: 60px;
    height: 60px;
    border-radius: 100%;
  }
  .character-hed{
    width: 100%;
  }
  .character-hed p{
    font-size: 15px;
  }
  .character-cl{
    width: 30%;
  }
  .character-cl p{
    font-size: 15px;
  }
.co-laou{
width: 92%;
margin-left: 4%;
background: #fff;
opacity: 0.8;
height: auto;
margin-top: 10px;
border-radius: 7px;
box-shadow: 1px 1px 6px 0.2px rgba(0,0,0,0.2);
}
.co-bott-om{
  display: flex;
  width: 92%;
  margin-left: 4%;
  padding-top: 5px;
  padding-bottom: 5px;
}
.work-job-lj {
    width: 25%;
    display: flex;
    align-items: center;
}
.work-job-lj p{
    font-size: 15px;

}
.work-job-cl{
  width: 75%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.job-pol-col{
  width: 100%;
  font-weight: 600;
}
.work-job-cl p{
  text-align: left;
  font-size: 15px;
}
.co-pljh{
  width: 92%;
  margin-left: 4%;
  padding: 8px 0px;
}
</style>
<style>


</style>